package com.example.zjx8969.myapplication.database;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.example.zjx8969.myapplication.compare.SDKInfo;

import java.util.List;

@Dao
public interface SDKControlDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(List<SDKInfo> infos);

    @Query("select * from sdkControl")
    List<SDKInfo> getAll();

    @Query("select * from sdkControl where `key`=:key")
    SDKInfo find(String key);

    @Query("update  sdkControl set crashInfo =:crashInfo where `key`=:key")
    void setCrash(String key, String crashInfo);
}
